﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="CreateUsers.aspx.cs" Inherits="TsWeb.Account.CreateUsers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">




</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="accountInfo">
  <fieldset class="register">
      <p>
                                <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserNameTxt">Usuario:</asp:Label>
                                <asp:TextBox ID="UserNameTxt" runat="server" CssClass="textEntry"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserNameTxt" 
                                     CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                     ValidationGroup="CreateUsersUserValidationGroup">*</asp:RequiredFieldValidator>
                            </p>
                            <p>
                                <asp:Label ID="NameLabel" runat="server" AssociatedControlID="NameTxt">Nombre:</asp:Label>
                                <asp:TextBox ID="NameTxt" runat="server" CssClass="textEntry"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="NameRequired" runat="server" ControlToValidate="NameTxt" 
                                     CssClass="failureNotification" ErrorMessage="El nombre no puede ser vacio." ToolTip="El nombre no puede ser vacio." 
                                     ValidationGroup="CreateUsersUserValidationGroup">*</asp:RequiredFieldValidator>
                            </p>
                            <p>
                                <asp:Label ID="SurnameLabel" runat="server" AssociatedControlID="SurnameTxt">Apellido:</asp:Label>
                                <asp:TextBox ID="SurnameTxt" runat="server" CssClass="textEntry"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="SurnameTxt" 
                                     CssClass="failureNotification" ErrorMessage="El apellido no puede ser vacio." ToolTip="El apellido no puede ser vacio." 
                                     ValidationGroup="CreateUsersUserValidationGroup">*</asp:RequiredFieldValidator>
                            </p>
                            <p>
                                <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="EmailTxt">E-mail:</asp:Label>
                                <asp:TextBox ID="EmailTxt" runat="server" CssClass="textEntry"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="EmailTxt" 
                                     CssClass="failureNotification" ErrorMessage="E-mail is required." ToolTip="E-mail is required." 
                                     ValidationGroup="CreateUsersUserValidationGroup">*</asp:RequiredFieldValidator>
                            </p>
                              <p>
                                <asp:Label ID="RolLabel" runat="server" AssociatedControlID="RolDropDownList">Rol:</asp:Label>
                                <!-- <asp:DropDownList ID="RolDropDownList" runat="server" CssClass="textEntry"></asp:DropDownList> !-->
                                 <asp:Repeater ID="UsersRoleList" runat="server" > 
                                  <ItemTemplate> 
                                       <asp:CheckBox runat="server" ID="RoleCheckBox" AutoPostBack="false" 
                                            Text='<%# Container.DataItem %>'/> 
                               
                                  </ItemTemplate> 
                                </asp:Repeater> 


                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="EmailTxt" 
                                     CssClass="failureNotification" ErrorMessage="E-mail is required." ToolTip="E-mail is required." 
                                     ValidationGroup="CreateUsersUserValidationGroup">*</asp:RequiredFieldValidator>
                            </p>



                            <p>
                                <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="PasswordTxt">Contraseña:</asp:Label>
                                <asp:TextBox ID="PasswordTxt" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="PasswordTxt" 
                                     CssClass="failureNotification" ErrorMessage="Password is required." ToolTip="Password is required." 
                                     ValidationGroup="CreateUsersUserValidationGroup">*</asp:RequiredFieldValidator>
                            </p>
                            <p>
                                <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPasswordTxt">Confirmar contraseña:</asp:Label>
                                <asp:TextBox ID="ConfirmPasswordTxt" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
                                <asp:RequiredFieldValidator ControlToValidate="ConfirmPasswordTxt" CssClass="failureNotification" Display="Dynamic" 
                                     ErrorMessage="Confirm Password is required." ID="ConfirmPasswordRequired" runat="server" 
                                     ToolTip="Confirm Password is required." ValidationGroup="CreateUsersUserValidationGroup">*</asp:RequiredFieldValidator>
                                <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="PasswordTxt" ControlToValidate="ConfirmPasswordTxt" 
                                     CssClass="failureNotification" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match."
                                     ValidationGroup="CreateUsersUserValidationGroup">*</asp:CompareValidator>
                            </p>
                      
                        <p class="submitButton">
                            <asp:Button ID="CreateUserButton" runat="server"  Text="Crear usuario" 
                                 ValidationGroup="CreateUsersUserValidationGroup" 
                                onclick="CreateUserButton_Click"/>
                        </p>
                        </fieldset>
                        </div>
                      
                     <span class="failureNotification">
                        <asp:Literal ID="ErrorMessage" runat="server"></asp:Literal>
                    </span>
                    <asp:ValidationSummary ID="CreateUsersSummary" runat="server" CssClass="failureNotification" 
                         ValidationGroup="CreateUsersUserValidationGroup"/>
                    



</asp:Content>
